<!doctype html public "-//w3c//dtd html 4.01 transitional//en">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

    <title>jquerymobi.html</title>
    <link type="text/css" href="css/smoothness/jquery-ui-1.8.20.custom.css" rel="stylesheet" />

    <script type="text/javascript" src="jq.mobi.min.js"></script>
    <script type="text/javascript" src="jq.ui.min.js"></script>

<script>
    
    
    function test(){
        var test = document.getElementById("test");
        //test.innerHTML = "传递过来的参数是： " + request.getString('name',true);
        
        var num = Number(request.getString('divnum',true));
        //alert(num);
        var s = "";
        
        for(var i=0; i<num; i++){
            //s += "<div id='" + i + "'>abc</div><br>";
            
            s += "abc<img class='pic' id='pic" + i + "'></img><br>";
            
            
            
        }
        //alert(s);
        test.innerHTML = s;
    }
    
    function test2(){
        var testDiv = document.getElementById("pic2");
        testDiv.src = "http://192.168.0.143/pto/001.jpg";
    }
    
    
    function testJquery(){
        //alert("dddddddddddddd");
        //$("#test").html("");
        $.getJSON(
        "http://192.168.0.143/pto/show.php",
        function action(data){
            //alert(data.picnum);
            //var urllist = data.urllist;
            
            var urllist = eval(data.urllist);
            var s = "";
            $.each(urllist, function (i,o) {
                //alert("id:" + i + "  name:" + o.name + "  url:" + o.url);
                s += "<img class='pic' id='pic" + i + "' src='" + o.url + "'></img><br>";
            });
            //alert(s);
            $("#test").html(s);
            
            //var test = document.getElementById("test");
            //test.innerHTML = s;
            
            //alert(data.urllist.size());
            
            
            
            //for(var i=0;i<1;i++){
                //for(var key in urllist[0]){
                 　　//alert("key："+key+",value："+jsonList[i][key]);
                //}
            //}
            
        }
        );
    }
</script>

<style>
    .pic{
        color: red;
        border-color: red;
        border-width: 1px;
        border-style: solid;
    }
    
</style>
</head>
<body>

<div id="jQUi">
    <div id="header">
        <!-- any additional HTML you want can go here -->
    </div>
    <div id="content">
        <div id="main" title="Welcome" class="panel" selected="true">
            <!-- by default, the first nav is associated with this panel -->
        </div>
         
        <div id="about" title="About" class="panel" data-nav="second_nav">
            <!-- by setting data-nav the "second_nav" will be shown on this panel -->
        </div>
    </div>
    <div id="navbar">
       <a target="#welcome" class="icon home">Home</a>
    </div>
     
    <nav >
        <div class='title'>Home</div>
        <ul>
            <li class="icon home mini"><a href="#main">Home</a></li>
        </ul>
    </nav>
    <nav id="second_nav">
        <div class='title'>Second</div>
        <ul>
            <li class="icon info mini"><a href="#about">About</a></li>
        </ul>
    </nav>
</div>









</body>
</html>